@import '@/app/styles/variables';

.overlay {
  position: fixed;
  bottom: 0;
  inset: 0px;
  background: rgba(0, 0, 0, 0.4);
  z-index: 100;
  overflow-y: auto;
  touch-action: none;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chevron_left {
  position: absolute;
  top: 24px;
  left: 24px;
  cursor: pointer;

  &:hover {
    rect {
      fill: #e1e1e1;
      color: #ababab;
    }
  }
}

.noOverlay {
  position: fixed;
  inset: 0px;
  z-index: 100;
  overflow-y: auto;
  touch-action: none;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal {
  position: relative;
  z-index: 1002 !important;
  width: 704px;
  margin: auto;
  max-width: 100%;
  padding: 56px;
  background: #ffffff;
  border-radius: 32px;
  touch-action: none;
  outline: none;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;

  &:before {
    position: absolute;
    content: '';
    top: -32px;
    height: 32px;
    width: 1px;
  }

  &:after {
    position: absolute;
    content: '';
    bottom: -32px;
    height: 32px;
    width: 1px;
  }
}

.container {
  width: 100%;
}

.home {
  display: none;
  color: #f3f3f3;
}

.cross {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  padding: 4px;
  justify-content: center;
  align-items: center;
  position: absolute;
  right: 24px;
  top: 24px;
  width: 32px;
  z-index: 100;

  height: 32px;
  border-radius: 133.333px;
  background: var(--Simple-Gray-Morning, #f3f3f3);

  &:hover {
    background: #e1e1e1;
    color: #ababab;
  }
}

.cross_shadow {
  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.04);
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.08);
}

@include media(sm) {
  .header {
    display: flex;
    height: 48px;
  }

  .chevron_left {
    display: none;
  }

  .home {
    display: unset;
  }

  .modal {
    position: absolute;
    bottom: 0;
    margin: 0;
    max-height: 100vh;
    -webkit-overflow-scrolling: touch !important;
    display: flex;
    touch-action: auto !important;
    overflow-y: auto !important;
    min-height: unset;
    width: 100%;
    align-items: center;
    padding: 48px 16px 12px 16px;
    flex-direction: column;
    transform: unset;
    border-radius: 24px 24px 0 0;
    background: var(--simple-morning, #fff);

    &:after,
    &:before {
      content: unset;
    }
  }

  .cross {
    top: 16px;
    right: 16px;
    padding: 0px;
    width: 24px;
    height: 24px;

    svg {
      transform: scale(calc(16 / 24));
    }
  }
}